﻿using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.Unity;

namespace LaserTag.Infrastructure
{
    public class InfrastructureModule : IModule
    {
        private const string CONFIG_FILENAME = "LaserTag.config";
        private readonly IUnityContainer m_container;

        public InfrastructureModule(IUnityContainer container)
        {
            m_container = container;
        }

        #region IModule Members

        public void Initialize()
        {
            m_container.RegisterInstance<IConfigurationSource>(new FileConfigurationSource(CONFIG_FILENAME));
        }

        #endregion
    }
}
